Replication Notes for Gray, Lindstädt and Slapin “Dynamics of Enlargement in International Organisations”
14 June 2016

PLEASE READ BEFORE ENGAGING IN ANY REPLICATION

All materials found in the zipped replication folder: “GLS_II_REP”

Files required for replication: 

1) initmems.Rdata: An R data file containing the object “samp” which is a list of 100 different initial memberships. The initial memberships have been designed to have different numbers of members, range and dispersion. They have been constructed so as to try to reduce collinearity between these three variables. 

2) functions.R: An R script that contains the functions that run the agent-based model. The “enlarge” function can, in principle, be used with any kind of space. However, at the moment it is optimized for use with a space that has 100 placeholders. If users want to use a different space, they may wish to adjust the trunctation for the new member draw and perceptions, which are defined on lines 48 and 52.

3) run_store_sim.R: An R script that applies our “enlarge” function to our initial memberships. It runs the simulations three times using different thresholds for admittance (50%, 67% and 75%). This script is somewhat time-consuming. It takes approximately 7hrs on a 3.2GHz iMac with 8 GB 1600 MHz DDR3 memory. It outputs 300 simulations stored as .csv files into the relevant folders (a50d50,a67d50,a75d50). These folders currently hold our stored simulations. If you run this code again, it will overwrite the files in these folders. For replication purposes, you may wish to create new folders with different names to compare the new outputs with the old. 

4) analysis_a50d50.R: An R script that analyses the output of the simulations and produces the plot “coef_figa50d50.pdf” which is found in Figure 1(a) of the paper. It also produces online appendix table A1.   

5) analysis_a67d50.R: An R script that analyses the output of the simulations and produces the plot “coef_figa67d50.pdf” which is found in Figure 1(b) of the paper. It also produces online appendix table A2.   

6) analysis_a75d50.R: An R script that analyses the output of the simulations and produces the plot “coef_figa75d50.pdf” which is found in Figure 1© of the paper. It also produces online appendix table A1.   

7) NAFTA hypothetical.R: An R script for running the NAFTA simulation and producing results found in Table 1 of the paper. 

8) mistakes_simulation.R: An R script for running the mistakes simulation found in the online appendix.

Steps for replication: 

1) Unzip replication materials and place in a folder on your local machine

2) PLEASE READ ALL HEADERS AND COMMENTS IN THE .R FILES! 

3) Set the paths at the top of the scripts where necessary.

4) Run the “run_store_sims.R” file. See point 3 above — you may wish to create new folders for output and change the paths in the script accordingly. Otherwise you will overwrite the existing files and will need to wait for seven hours for the script to run. 

5) Run the analysis_a++d++.R files 

6) Run the NAFTA hypothetical.R file. 

7) Run mistakes_simulation.R file. 

